# conding = utf-8
from pages.page import Page
from pages.xgz.instiution import *


class Instiution(Page):

    # 查询UI测试
    def open_admin(self):
        '''
        打开管理员UI，如果已经打开则不会执行单击动作
        :return:
        '''
        if self.display(leftmenu) is False:
            self.click(leftmenu_sys)
        self.click(leftmenu)

    #添加机构
    def add_institution(self):
        self.click(add_institution)

    #第一个输入框
    def first_institution(self,value):
        self.send_keys(first_institution,value)

    # 第二个输入框
    def the_institution(self,value):
        self.send_keys(the_institution,value)

    #确定
    def sure_institition(self):
        self.click(sure_institition)

    #取消
    def close_isntitution(self):
        self.click(close_isntitution)

    #断言
    def assertion_institition(self):
        return self.text(assertion_institition)



    #编辑
    def edit_insti(self):
        self.click(edit_insti)

    #输入姓名
    def name_insti(self,value):
        self.send_keys(name_insti,value)


    #保存
    def sure_isnit(self):
        self.click(sure_isnit)

    #取消
    def cancel_insit(self):
        self.click(cancel_insit)

    # 结果
    def assertion_insti(self):
        return self.text(assertion_insti)


    #删除
    #选中
    def delect_institition(self):
        self.click(delect_institition)

    ##批量删除
    def delectd_institition(self):
        self.click(batch_institition)

    #确定
    def suret_institition(self):
        self.click(suret_institition)

    #断言
    def assertione_institition(self):
        return self.text(assertion_institition)



    #操作树
    def actiontree_ins(self):
        self.click(actiontree_ins)

    #父关系
    def father_ins(self):
        self.click(father_ins)

    #勾选
    def goxu_ins(self):
        self.click(goxu_ins)

    #取消关联
    def cancel_ins(self):
        self.click(cancel_ins)

    # 全部勾选
    def all_ins(self):
        self.click(all_ins)

    #取消全选
    def cancele_ins(self):
        self.click(cancele_ins)

    #合并全选
    def merge_isn(self):
        self.click(merge_isn)

    #展开所有
    def expand_all_ins(self):
        self.click(expand_all_ins)
